package com.yao.shardingdemo.service.impl;

import com.yao.shardingdemo.entity.Product;
import com.yao.shardingdemo.mapper.ProductMapper;
import com.yao.shardingdemo.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Henry Yao
 */
@Service
public class ProductServiceImpl implements ProductService {
    private final ProductMapper productMapper;

    @Autowired
    public ProductServiceImpl(ProductMapper productMapper) {
        this.productMapper = productMapper;
    }

    @Override
    public void insertProduct(Product product) {
        productMapper.insertProduct(product);
    }
}
